package com.xuzimian.globaldemo.rpc.rmi.remote;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.List;
/**
 * @program: global-demo
 * @description:远程服务器上提供服务的rmi接口实现
 * @author: xzm
 * @create: 2019-01-10 10:23
 **/
public class StudentServiceImpl extends UnicastRemoteObject implements
        StudentService {
    public StudentServiceImpl() throws RemoteException {
    }
    public List<Student> getList() throws RemoteException {
        List<Student> list=new ArrayList<Student>();
        Student s1=new Student();
        s1.setName("张三");
        s1.setAge(15);
        Student s2=new Student();
        s2.setName("李四");
        s2.setAge(20);
        list.add(s1);
        list.add(s2);
        return list;
    }
}